package com.ciwong.epaper.modules.me.bean;

import com.ciwong.mobilelib.bean.BaseBean;
import com.google.gson.Gson;

import java.util.List;

/**
 * 电子报服务信息
 *
 * @author bin
 * @version ciwong v.1.0 2015/8/26 10:33
 * @since ciwong v.1.0
 */
public class Service extends BaseBean {


    private static final long serialVersionUID = 1931091317527180459L;
    /**
     * 服务类型ID,如果<=0 则表示未设置
     */
    private int id;

    /**
     * 服务名称
     */
    private String name;

    /**
     * 服务LOGO URL
     */
    private String logo;

    /**
     * 服务描述
     */
    private String desc;

    /**
     * 适用区域
     */
    private String area;

    /**
     * 适用年段
     */
    private String period;

    /**
     * 购买模式 1买断
     * <p>
     * 购买模式（1：买断 0：月份 3：免费）[1:买断,2:按月购买,3:免费]
     */
    private int sign;

    /**
     * 价格
     */
    private List<Price> price;

    /**
     * 购买数
     */
    private int buycount;

    /**
     * 在商城购买人数的基数
     */
    private int orderbase;

    /**
     * 是否促销
     */
    private boolean ispromo;

    /**
     * 促销信息
     */
    private Promotion promotion;

    /**
     * 试用信息 试用类型（5：移动端 6：渠道商赠送）
     */
    private List<Trial> trial;

    private List<Photo> photos;

    /**
     * 优惠券列表
     */
    private List<Coupon> couponList;


    private int bookId;
    private int salesType;
    private int buyServiceType;
    private String gradeName;

    public int getBuyServiceType() {
        return buyServiceType;
    }

    public void setBuyServiceType(int buyServiceType) {
        this.buyServiceType = buyServiceType;
    }

    public String getGradeName() {
        return gradeName;
    }

    public void setGradeName(String gradeName) {
        this.gradeName = gradeName;
    }

    public List<Photo> getPhotos() {
        return photos;
    }

    public void setPhotos(List<Photo> photos) {
        this.photos = photos;
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }

    public int getSalesType() {
        return salesType;
    }

    public void setSalesType(int salesType) {
        this.salesType = salesType;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setTrial(List<Trial> trial) {
        this.trial = trial;
    }

    public List<Trial> getTrial() {
        return trial;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getPeriod() {
        return period;
    }

    public void setPeriod(String period) {
        this.period = period;
    }

    public int getSign() {
        return sign;
    }

    public void setSign(int sign) {
        this.sign = sign;
    }

    public List<Price> getPrice() {
        return price;
    }

    public void setPrice(List<Price> price) {
        this.price = price;
    }


    public void setBuycount(int buycount) {
        this.buycount = buycount;
    }


    public int getBuycount() {
        return buycount;
    }


    public void setIspromo(boolean ispromo) {
        this.ispromo = ispromo;
    }


    public boolean ispromo() {
        return ispromo;
    }

    public void setPromotion(Promotion promotion) {
        this.promotion = promotion;
    }

    public List<Coupon> getCouponList() {
        return couponList;
    }

    public void setCouponList(List<Coupon> couponList) {
        this.couponList = couponList;
    }

    public Promotion getPromotion() {
        return promotion;
    }

    @Override
    public boolean equals(Object o) {
        return getId() == ((Service) o).getId();
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }

    public int getOrderbase() {
        return orderbase;
    }

    public void setOrderbase(int orderbase) {
        this.orderbase = orderbase;
    }
}
